<?php
	header('Content-Type: image/jpeg');
	include('includes/SimpleImage.php');
	$image = new SimpleImage();
	//rawurlencode
	$filename=explode("/",$_GET['img']);
	$filename=$filename[count($filename)-1];
	$url=substr($_GET['img'],0,strrpos($_GET['img'],$filename));
	$_GET['img']=$url.rawurlencode($filename);
	$image->load($_GET['img']);
	$image->resizeToWidth($_GET['size']);
	$image->output(); 
?>